import { Component, OnInit, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-header',
  templateUrl: './header.component.html',
  styleUrls: ['./header.component.scss']
})
export class HeaderComponent implements OnInit {

  //侧滑菜单状态
  @Output() toggle = new EventEmitter<void>();
  //主题切换
  @Output() changTheme = new EventEmitter<boolean>();

  constructor() { }

  ngOnInit() {
  }

  openSidebar() {
    this.toggle.emit();
  }

  onChange(isDark: boolean) {
    this.changTheme.emit(isDark);
  }
}
